Everything started with the Battle at Mohacs in August 1526, when Hungarian troops were overridden by Turkish army. King Louis II perished in this battle. He left no heir therefore a new fight over the royal crown begun between the richest Hungarian nobleman John Zapolya, who was supported by lesser nobility and Ferdinand I, supported by higher nobility and the royal court. John Zapolya was elected King in Belgrade on November 10, 1526, the day after he was crowned King of Hungary. Ferdinand did not wait. He called all his supporters to Bratislava and got elected king on December 26, 1526.
Long lasting fight began. A truce was finally concluded in February 1538, John Zapolya and Ferdinand agreed to rule over certain parts of the country. Zapolya ruled in Transylvania, Central and Eastern Hungary, Ferdinand ruled in Western Hungary including current territory of Slovakia. One of the important towns for Ferdinand in this region was Bratislava. The town has from the beginning taken his side, he was elected king here, and Vienna was close.